package com.hnichr.ump.common.schedule.entity;


import com.hnichr.ump.common.entity.UmpEntity;
import com.mxpioframework.jpa.annotation.Generator;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "t_schedule_log")
@Schema(description = "定时任务日志")
public class ScheduleLog extends UmpEntity {

    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "ID")
    private String id;

    @Column(name = "SCHEDULE_NAME_")
    @Schema(description = "调度名称")
    private String scheduleName;

    @Column(name = "START_TIME_")
    @Schema(description = "运行开始时间")
    private Date startTime;

    @Column(name = "END_TIME_")
    @Schema(description = "运行结束时间")
    private Date endTime;

    @Column(name = "RUNN_RESULT_")
    @Schema(description = "运行结果")
    private String runResult;

    @Column(name = "ERROR_MESSAGE_")
    @Schema(description = "错误信息")
    private String errorMessage;
}
